// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import ElementUI from 'element-ui';
import axios from 'axios';
import qs from 'qs';
import App from './App';
import './element-variables.scss';
/* eslint-disable */
import 'babel-polyfill';
/* eslint-ensable */

Vue.config.productionTip = false;
Vue.use(ElementUI);

axios.defaults.baseURL = `${window.location.protocol}//${window.location.host}/`;
axios.defaults.timeout = 30000;
axios.defaults.transformRequest = [data => qs.stringify(data)];
// axios.defaults.headers = { 'Cache-Control': 'no-cache' };

Vue.prototype.$http = axios;

/* eslint-disable no-new */
new Vue({
  el: '#app',
  components: { App },
  template: '<App/>',
});
